<?php
/**
 * User: liubao
 * Date: 19-4-30
 * Time: 下午4:39
 */

namespace App\Model;


use App\Db\Model;

class User extends Model
{
    public $from = 'user';

    public function testSelect()
    {
        $res = $this->slave1()->getAll();
        return $res;
    }

    public function login($username,$password)
    {
        $where = [
          'username' => $username,
          'password' => md5($password)
        ];
        $res = $this->slave1()->select('username')->where($where)->get();
        return $res;
    }

}
